public class Test011 {
public static void main(String[] args) {
     for(int year=1000;year<2000;year++){
        if(fac(year)){
            System.out.println(year);
        }
    }
}
    public static boolean fac ( int year){
    if (year % 100!=0 && year % 4==0 || year % 400 ==0){
        return true;
        }
    return false;
    }
}
